Yury Selivanov - async/await in Python 3.5 and why it is awesome
[21 July 2016 / 2016-07-21]
[Bilbao, Euskadi, Spain]
async/await is here, everybody can use it in Python 3.5. It's great
and awesome, yet only a few understand it. As a PEP 492 author, I'd
really like to have a chance to better explain the topic, show why
async/await is important and how it will affect Python. I'll also tell
a story on how I worked on the PEP -- starting from an idea that I
discussed with Guido on PyCon US 2015, and landing to CPython source
code one and a half moths later!
The talk will start with a brief coverage of the story of asynchronous
programming in Python -- Twisted, Tornado, Stackless Python &
greenlets, eventlet, Tornado, asyncio & curio. We've come a really
long road, and it's important to understand how we ended up with
Then I'll go over asyncio and curio, showing async/await by example,
explaining that in reality it's a very easy to use language feature.
You don't need to know all the details to be able to successfully use
the new syntax, and even build new frameworks on top of it.
I'll then explain the async/await machinery in CPython, starting with
generators and 'yield' expression, showing what is 'yield from' and
finally, demonstrating how async/await is implemented in CPython.
This will ensure that those who want to invent some new crazy ways of
using async/await will have a starting point!
I'll end the talk with a story of how I came up with the idea. How I
shared it with Guido van Rossum, Victor Stinner, and Andrew Svetlow.
How the first version of the PEP was born, and how we managed to push
it to Python 3.5 in under two months period. The goal is to make
people understand that it's possible to change your programming
language -- in fact, Python, as any other programming language, wants
new features and capabilities to be relevant.